package com.rs.game.player.content.commands;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.text.NumberFormat;
import java.util.Locale;

import com.rs.cache.loaders.ItemDefinitions;
import com.rs.cache.loaders.NPCDefinitions;
import com.rs.game.Animation;
import com.rs.game.ForceTalk;
import com.rs.game.Graphics;
import com.rs.game.World;
import com.rs.game.WorldTile;
import com.rs.game.npc.NPC;
import com.rs.game.npc.others.KalGer;
import com.rs.game.player.Player;
import com.rs.game.player.QuestManager.Quests;
import com.rs.game.player.Skills;
import com.rs.game.player.content.Commands;
import com.rs.game.player.content.ItemSearch;
import com.rs.game.player.content.ShootingStar;
import com.rs.game.player.content.dungeoneering.DungeonPartyManager;
import com.rs.game.player.content.pet.Pets;
import com.rs.utils.IPBanL;
import com.rs.utils.Misc;
import com.rs.utils.SerializableFilesManager;
import com.rs.utils.Utils;

public class Administrator {

	private static String message;

	/*
	 * Handles Administrator Commands
	 */
	public static boolean CanYell;

	public static boolean processCommand(final Player player, String[] cmd, boolean console, boolean clientCommand) {

		if (clientCommand) {
			switch (cmd[0]) {
			
			/*
			 * Teleport to a location
			 * 
			 * Usage: ::tele x y plane Example: ::tele 1000,1000,0
			 */
			case "tele":
				cmd = cmd[1].split(",");
				int plane = Integer.valueOf(cmd[0]);
				int x = Integer.valueOf(cmd[1]) << 6 | Integer.valueOf(cmd[3]);
				int y = Integer.valueOf(cmd[2]) << 6 | Integer.valueOf(cmd[4]);
				player.setNextWorldTile(new WorldTile(x, y, plane));
				return true;
			}
		} else {
			String name;
			Player target;

			switch (cmd[0]) {
			
			case "test":
                player.setLoyaltyPoints(player.getLoyaltyPoints() + 1000000);
                player.getPackets().sendGameMessage("You currently have " + "<col=008000>" +player.getLoyaltyPoints()+ "</col>" + " loyalty points!");
				return true;
				
			case "test2":
				player.getDialogueManager().startDialogue("Lollk");
				return true;
				
			case"kalger":
                KalGer.addPlayer(player);
                return true;	
 
			case "tackle":
				name = "";
				for (int i = 1; i < cmd.length; i++) {
					name += cmd[i] + ((i == cmd.length - 1) ? "" : " ");
				}
				target = World.getPlayerByDisplayName(name);
				if (target != null) {
					target.setNextAnimation(new Animation(15184));
				} else {
					player.getPackets().sendGameMessage(Utils.formatPlayerNameForDisplay(name) + " is either offline, or doesn't exist.");
					return true;
				}
				return true;
				
			case "title":
				if (player.isAFK()) {
					player.getPackets().sendGameMessage("You may not be afk to use this command.");
					return true;
				}
				try {
						player.getAppearence().setTitle(Integer.valueOf(cmd[1]));	
				} catch (NumberFormatException e) {
					player.getPackets().sendGameMessage("Use: ::title id");
				}
				return true; 
				/*
				 * Sets level someone else
				 * 
				 * Usage: ::setlevelother playername skillid level
				 * Example: ::setlevelother light 2 99
				 */
			case "setlevelother":
				String username = cmd[1].substring(cmd[1].indexOf(" ") + 1);
				Player other = World.getPlayerByDisplayName(username);
				if (other == null)
					return true;
				int skill = Integer.parseInt(cmd[2]);
				int level = Integer.parseInt(cmd[3]);
				other.getSkills().set(Integer.parseInt(cmd[2]), Integer.parseInt(cmd[3]));
				other.getSkills().set(skill, level);
				other.getSkills().setXp(skill, Skills.getXPForLevel(level));
				other.getPackets().sendGameMessage("One of your skills:  " + other.getSkills().getLevel(skill) + " has been set to " + level + " from " + player.getDisplayName() + ".");
				player.getPackets().sendGameMessage("You have set the skill:  " + other.getSkills().getLevel(skill) + " to " + level + " for " + other.getDisplayName() + ".");
				return true;
	
			case "makedance":
				name = "";
				for (int i = 1; i < cmd.length; i++) {
					name += cmd[i] + ((i == cmd.length - 1) ? "" : " ");
				}
				target = World.getPlayerByDisplayName(name);
				if (target != null) {
					target.setNextAnimation(new Animation(7071));
				} else {
					player.getPackets().sendGameMessage(Utils.formatPlayerNameForDisplay(name) + " is either offline, or doesn't exist.");
					return true;
				}
				return true;

				/*
				 * IP Ban a player
				 * 
				 * Usage: ::ipban playerName Example: ::ipban swirl
				 */
			case "ipban":
				name = "";
				for (int i = 1; i < cmd.length; i++) {
					name += cmd[i] + ((i == cmd.length - 1) ? "" : " ");
				}
				target = World.getPlayerByDisplayName(name);
				if (target != null) {
					if (target.getRights() >= 2) {
						player.getPackets().sendGameMessage("You can't IP Ban administrators!");
						return true;
					}
					IPBanL.ban(target, true);
					player.getPackets().sendGameMessage("You've permanently IP banned " + target.getDisplayName() + ".");
				} else {
					name = Utils.formatPlayerNameForProtocol(name);
					if (!SerializableFilesManager.containsPlayer(name)) {
						player.getPackets().sendGameMessage("Account name " + Utils.formatPlayerNameForDisplay(name) + " doesn't exist.");
						return true;
					}
					target = SerializableFilesManager.loadPlayer(name);
					target.setUsername(name);
					IPBanL.ban(target, false);
					player.getPackets().sendGameMessage("You have IP banned " + Utils.formatPlayerNameForDisplay(name) + " for 48 hours.");
					SerializableFilesManager.savePlayer(target);
				}
				break;

			/*
			 * UnIP Ban a player
			 * 
			 * Usage: ::unipban playerName Example: ::unipban swirl
			 */
			case "unipban":
				name = "";
				for (int i = 1; i < cmd.length; i++) {
					name += cmd[i] + ((i == cmd.length - 1) ? "" : " ");
				}
				target = World.getPlayerByDisplayName(name);
				if (target != null) {
					IPBanL.unban(target);
					player.getPackets().sendGameMessage("You have UnIP banned " + target.getDisplayName() + ".");
				} else {
					name = Utils.formatPlayerNameForProtocol(name);
					if (!SerializableFilesManager.containsPlayer(name)) {
						player.getPackets().sendGameMessage("Account name " + Utils.formatPlayerNameForDisplay(name) + " doesn't exist.");
						return true;
					}
					target = SerializableFilesManager.loadPlayer(name);
					target.setUsername(name);
					IPBanL.unban(target);
					player.getPackets().sendGameMessage("You have UnIP banned " + Utils.formatPlayerNameForDisplay(name) + " for 48 hours.");
					SerializableFilesManager.savePlayer(target);
				}
				break;

			/*
			 * Temporarily Ban a player
			 * 
			 * Usage: ::tempban playerName Example: ::tempban swirl
			 */
			case "tempban":
				name = "";
				for (int i = 1; i < cmd.length; i++) {
					name += cmd[i] + ((i == cmd.length - 1) ? "" : " ");
				}
				target = World.getPlayerByDisplayName(name);
				if (target != null) {
					if (target.getRights() >= 2) {
						player.getPackets().sendGameMessage("You can't ban administrators!");
						return true;
					}
					target.setBanned(Utils.currentTimeMillis() + (48 * 60 * 60 * 1000));
					target.getSession().getChannel().close();
					player.getPackets().sendGameMessage("You have banned " + Utils.formatPlayerNameForDisplay(target.getDisplayName()) + " for 48 hours.");
				} else {
					name = Utils.formatPlayerNameForProtocol(name);
					if (!SerializableFilesManager.containsPlayer(name)) {
						player.getPackets().sendGameMessage("Account name " + Utils.formatPlayerNameForDisplay(name) + " doesn't exist.");
						return true;
					}
					target = SerializableFilesManager.loadPlayer(name);
					target.setUsername(name);
					target.setBanned(Utils.currentTimeMillis() + (48 * 60 * 60 * 100));
					player.getPackets().sendGameMessage("You have banned " + Utils.formatPlayerNameForDisplay(name) + " for 48 hours.");
					SerializableFilesManager.savePlayer(target);
				}
				return true;
			case "resettrollname":
				player.getPetManager().setTrollBabyName(null);
				return true;
				
		case "dumpnpcs":
			String location = "data/npcs/NPCList.txt";
			System.out.println("Starting dump at "+location);
			for (int id = 0; id < Utils.getNPCDefinitionsSize(); id++)  {
				try {
					BufferedWriter writer = new BufferedWriter(new FileWriter(location, true));
					writer.write(NPCDefinitions.getNPCDefinitions(id).getId()+" - " +
							""+NPCDefinitions.getNPCDefinitions(id).getName());
					writer.newLine();
					writer.flush();
					writer.close();
				} catch (IOException e) {
					e.printStackTrace();
				}
			}
		return true;
		
			case "settrollname":
				String name1 = "";
				for (int i = 1; i < cmd.length; i++) {
					name1 += cmd[i] + ((i == cmd.length - 1) ? "" : " ");
				}
				name1 = Misc.formatPlayerNameForDisplay(name1);
				if (name1.length() < 3 || name1.length() > 14) {
					player.getPackets()
					.sendGameMessage(
							"You can't use a name shorter than 3 or longer than 14 characters.");
					return true;
				}
				player.getPetManager().setTrollBabyName(name1);
				if (player.getPet() != null
						&& player.getPet().getId() == Pets.TROLL_BABY
						.getBabyNpcId()) {
					player.getPet().setName(name1);
				}
				return true;
				
			case "givekiln":
				name1 = "";
				for (int i = 1; i < cmd.length; i++) {
					name1 += cmd[i] + ((i == cmd.length - 1) ? "" : " ");
				}
				target = World.getPlayerByDisplayName(name1);
				if (target != null) {
					target.setCompletedFightKiln();
					target.getInventory().addItem(23659, 1);
			} else {
				player.getPackets().sendGameMessage(Utils.formatPlayerNameForDisplay(name1) + " is either offline, or doesn't exist.");
				return true;
			}
			return true;
			
			case "troll":
				player.getControlerManager().startControler("TrollInvasion", true);
				return true;
				
			case "testdung":
				new DungeonPartyManager(player);
				return true;

				/*
				 * Give a player slayer points
				 * 
				 * Usage: ::giveslayerpoints playerName amount Example:
				 * ::giveslayerpoints swirl 18
				 */
			case "giveslayerpoints":
				name1 = cmd[1].substring(cmd[1].indexOf(" ") + 1);
				target = World.getPlayerByDisplayName(name1);
				if (target == null) {
					return true;
				}
				target.setSlayerPoints(target.getSlayerPoints() + Integer.parseInt(cmd[2]));
				target.getPackets().sendGameMessage("You have received " + Integer.parseInt(cmd[2]) + " slayer points from " + player.getDisplayName() + "!");
				return true;

				/*
				 * Unstucks
				 * 
				 * Usage: ::unstuck playername Example: ::unstuck light
				 */
			case "unstuck":
				String nameee = cmd[1];
				Player targete = SerializableFilesManager.loadPlayer(Utils.formatPlayerNameForProtocol(nameee));
				if (targete != null) {
					targete.setUsername(Utils.formatPlayerNameForProtocol(nameee));
				}
				targete.setLocation(new WorldTile(3095, 3497, 0));
				SerializableFilesManager.savePlayer(targete);

				return true;

				/*
				 * Send message through npcs
				 * 
				 * Usage: npcmask Example: npcmask
				 */
			case "npcmask":
				for (NPC n : World.getNPCs()) {
					if (n != null && Utils.getDistance(player, n) < 9) {
						n.setNextForceTalk(new ForceTalk("Move.. move your body.. Disco dance.. Discoooo Danceeee...!"));
						n.setNextAnimation(new Animation(7071));
					}
				}

				/*
				 * Checks inv of a player
				 * 
				 * Usage: ::checkinventory (playername) Example: checkinventory
				 * light
				 */
			case "checkinv":
				if (cmd[1].length() == 0) {
					return false;
				}
				NumberFormat nf = NumberFormat.getInstance(Locale.US);
				String amounts;
				Player player2 = World.getPlayer(cmd[1]);

				int player2freeslots = player2.getInventory().getFreeSlots();
				int player2usedslots = 28 - player2freeslots;

				player.getPackets().sendGameMessage("----- Inventory Information -----");
				player.getPackets().sendGameMessage("<col=DF7401>" + Utils.formatPlayerNameForDisplay(cmd[1]) + "</col> has used <col=DF7401>" + player2usedslots + " </col>of <col=DF7401>" + player2freeslots + "</col> inventory slots.");
				player.getPackets().sendGameMessage("Inventory contains:");
				for (int i = 0; i < player2usedslots; i++) {
					amounts = nf.format(player2.getInventory().getItems().getNumberOf(player2.getInventory().getItems().get(i).getId()));
					player.getPackets().sendGameMessage("<col=088A08>" + amounts + "</col><col=BDBDBD> x </col><col=088A08>" + player2.getInventory().getItems().get(i).getName());

				}
				player.getPackets().sendGameMessage("--------------------------------");
				return true;
				/*
				 * Give a player a starter
				 * 
				 * Usage: ::givestarter playerName Example: ::giverstarter swirl
				 */
			case "givestarter":
				name1 = "";
				for (int i = 1; i < cmd.length; i++) {
					name1 += cmd[i] + ((i == cmd.length - 1) ? "" : " ");
				}
				target = World.getPlayerByDisplayName(name1);
				if (target != null) {
					target.getInventory().addItem(1856, 1); // Information Book
					target.getInventory().addItem(995, 2500000); // 2.5M GP
					target.getInventory().addItem(1153, 1); // Iron Helm
					target.getInventory().addItem(1115, 1); // Iron Platebody
					target.getInventory().addItem(1067, 1); // Iron Platelegs
					target.getInventory().addItem(1191, 1); // Iron Kiteshield
					target.getInventory().addItem(1323, 1); // Iron Scimitar
					target.getInventory().addItem(24315, 1); // Limited time
																// Cape
					target.getInventory().addItem(1167, 1); // Cowl
					target.getInventory().addItem(1129, 1); // Body
					target.getInventory().addItem(1095, 1); // Chaps
					target.getInventory().addItem(841, 1); // Shortbow
					target.getInventory().addItem(884, 500); // Arrow
					target.getInventory().addItem(579, 1); // Hat
					target.getInventory().addItem(577, 1); // Top
					target.getInventory().addItem(1011, 1); // Bottom
					target.getInventory().addItem(1379, 1); // Staff
					target.getInventory().addItem(556, 250); // Air Rune
					target.getInventory().addItem(558, 250); // Mind Rune
					target.getInventory().addItem(554, 250); // Fire Rune
					target.getInventory().addItem(386, 100); // Shark
					target.getInventory().addItem(23256, 10); // Super Attack
																// Flask
					target.getInventory().addItem(23280, 10); // Super Strength
																// Flask
					target.getInventory().addItem(23292, 10); // Super Defence
																// Flask
					target.setSpins(2);
					target.sendMessage("You have recieved 2 free spins! To get any more spins you must earn them.");
				} else {
					player.getPackets().sendGameMessage(Utils.formatPlayerNameForDisplay(name1) + " is either offline, or doesn't exist.");
					return true;
				}
				return true;

				/*
				 * Unban a player
				 * 
				 * Usage: ::unban playerName Example: ::unban swirl
				 */
			case "unban":
				name1 = "";
				for (int i = 1; i < cmd.length; i++) {
					name1 += cmd[i] + ((i == cmd.length - 1) ? "" : " ");
				}
				target = World.getPlayerByDisplayName(name1);
				if (target != null) {
					IPBanL.unban(target);
					player.getPackets().sendGameMessage("You have unbanned " + Utils.formatPlayerNameForDisplay(name1) + ".");
				} else {
					name1 = Utils.formatPlayerNameForProtocol(name1);
					if (!SerializableFilesManager.containsPlayer(name1)) {
						player.getPackets().sendGameMessage("Account name " + Utils.formatPlayerNameForDisplay(name1) + " doesn't exist.");
						return true;
					}
					target = SerializableFilesManager.loadPlayer(name1);
					target.setUsername(name1);
					IPBanL.unban(target);
					player.getPackets().sendGameMessage("You have unbanned " + Utils.formatPlayerNameForDisplay(name1) + ".");
					SerializableFilesManager.savePlayer(target);
				}
				return true;

				/*
				 * Give an item to a player
				 * 
				 * Usage: ::giveitem playerName itemId amount Example:
				 * ::giveitem swirl 995 10
				 */
			case "giveitem":
				name1 = cmd[1].substring(cmd[1].indexOf(" ") + 1);
				target = World.getPlayerByDisplayName(name1);
				if (target != null) {
					int item = Integer.parseInt(cmd[2]);
					int amount = Integer.parseInt(cmd[3]);
					target.getInventory().addItem(item, amount);
					target.getPackets().sendGameMessage(Utils.formatPlayerNameForDisplay(player.getDisplayName()) + " has given you " + amount + " of " + ItemDefinitions.getItemDefinitions(item).name.toLowerCase() + ".");
					player.getPackets().sendGameMessage("You have given " + Utils.formatPlayerNameForDisplay(name1) + " " + amount + " of " + ItemDefinitions.getItemDefinitions(item).name.toLowerCase());
					return true;
				} else {
					player.getPackets().sendGameMessage(Utils.formatPlayerNameForDisplay(name1) + " is either offline, or doesn't exist.");
					return true;
				}

				/*
				 * Promote a player to moderator or admin
				 * 
				 * Usage: ::promote playerName Example: ::promote swirl
				 */
			case "promote":
				name1 = "";
				for (int i = 1; i < cmd.length; i++) {
					name1 += cmd[i] + ((i == cmd.length - 1) ? "" : " ");
				}
				target = World.getPlayerByDisplayName(name1);
				if (target != null) {
					int newRights = target.getRights() + 1;

					if (newRights == 1 || newRights == 2) {
						target.setRights(newRights);
						target.setStaff(true);
						target.getPackets().sendGameMessage("You have been promoted to " + (newRights == 1 ? "moderator" : "administrator") + "!");
						player.getPackets().sendGameMessage("You have promoted " + Utils.formatPlayerNameForDisplay(name1) + " to " + (newRights == 1 ? "moderator" : "administrator") + "!");
						target.getAppearence().generateAppearenceData();
						return true;
					} else {
						player.getPackets().sendGameMessage(Utils.formatPlayerNameForDisplay(name1) + " is already at the top!");
						return true;
					}
				} else {
					player.getPackets().sendGameMessage(Utils.formatPlayerNameForDisplay(name1) + " is either offline, or doesn't exist.");
					return true;
				}

				/*
				 * Demote a player to normal or moderator
				 * 
				 * Usage: ::demote playerName Example: ::demote swirl
				 */
			case "demote":
				name1 = "";
				for (int i = 1; i < cmd.length; i++) {
					name1 += cmd[i] + ((i == cmd.length - 1) ? "" : " ");
				}
				target = World.getPlayerByDisplayName(name1);
				if (target != null) {
					int newRights = target.getRights() - 1;

					if (newRights == 1 || newRights == 0) {
						target.setRights(newRights);
						target.setStaff((newRights == 1 ? true : false));
						target.getPackets().sendGameMessage("You have been demoted to " + (newRights == 1 ? "moderator" : "normal player") + "!");
						player.getPackets().sendGameMessage("You have demoted " + Utils.formatPlayerNameForDisplay(name1) + " to " + (newRights == 1 ? "moderator" : "normal player") + "!");
						target.getAppearence().generateAppearenceData();
						return true;
					} else {
						player.getPackets().sendGameMessage(Utils.formatPlayerNameForDisplay(name1) + " is already at the bottom!");
						return true;
					}
				} else {
					player.getPackets().sendGameMessage(Utils.formatPlayerNameForDisplay(name1) + " is either offline, or doesn't exist.");
					return true;
				}
				/*
				 * Teleport to a location
				 * 
				 * Usage: ::tele x y plane Example: ::tele 1000 1000 0
				 */
			case "tele":
				if (cmd.length < 3) {
					player.getPackets().sendPanelBoxMessage("Use: ::tele coordX coordY");
					return true;
				}
				try {
					player.resetWalkSteps();
					player.setNextWorldTile(new WorldTile(Integer.valueOf(cmd[1]), Integer.valueOf(cmd[2]), cmd.length >= 4 ? Integer.valueOf(cmd[3]) : player.getPlane()));
				} catch (NumberFormatException e) {
					player.getPackets().sendPanelBoxMessage("Use: ::tele coordX coordY plane");
				}
				return true;

				/*
				 * Unmute a player
				 * 
				 * Usage: ::unmute playerName Example: ::unmute swirl
				 */
			case "unmute":
				name1 = "";
				for (int i = 1; i < cmd.length; i++) {
					name1 += cmd[i] + ((i == cmd.length - 1) ? "" : " ");
				}
				target = World.getPlayerByDisplayName(name1);
				if (target != null) {
					target.setMuted(0);
					target.getPackets().sendGameMessage("You've unmuted by " + Utils.formatPlayerNameForDisplay(player.getUsername()));
					player.getPackets().sendGameMessage("You unmuted " + Utils.formatPlayerNameForDisplay(name1) + ".");
				} else {
					name1 = Utils.formatPlayerNameForProtocol(name1);
					if (!SerializableFilesManager.containsPlayer(name1)) {
						player.getPackets().sendGameMessage("Account name " + Utils.formatPlayerNameForDisplay(name1) + " doesn't exist.");
						return true;
					}
					target = SerializableFilesManager.loadPlayer(name1);
					target.setUsername(name1);
					target.setMuted(0);
					player.getPackets().sendGameMessage("You unmuted " + Utils.formatPlayerNameForDisplay(name1) + ".");
					SerializableFilesManager.savePlayer(target);
				}
				return true;
				/*
				 * Unjail a player
				 * 
				 * Usage: ::unjail playerName Example: ::unjail swirl
				 */
			case "unjail":
				name1 = "";
				for (int i = 1; i < cmd.length; i++) {
					name1 += cmd[i] + ((i == cmd.length - 1) ? "" : " ");
				}
				target = World.getPlayerByDisplayName(name1);
				if (target != null) {
					target.setJailed(0);
					target.getControlerManager().startControler("JailControler");
					target.getPackets().sendGameMessage("You've unjailed " + Utils.formatPlayerNameForDisplay(player.getUsername()) + ".");
					player.getPackets().sendGameMessage("You have unjailed " + Utils.formatPlayerNameForDisplay(name1) + " for 24 hours.");
				} else {
					player.getPackets().sendGameMessage(Utils.formatPlayerNameForDisplay(name1) + " is either offline, or doesn't exist.");
				}
				return true;

				/*
				 * Give a player squeal of fortune spins
				 * 
				 * Usage: ::givespins playerName amount Example: ::givespins
				 * swirl 10
				 */
			case "givespins":
				name1 = cmd[1].substring(cmd[1].indexOf(" ") + 1);
				target = World.getPlayerByDisplayName(name1);
				if (target != null) {
					try {
						target.setSpins(target.getSpins() + Integer.parseInt(cmd[2]));
						target.getPackets().sendGameMessage("You were given " + cmd[2] + " spins by " + Utils.formatPlayerNameForDisplay(player.getUsername()) + ".");
						player.getPackets().sendGameMessage("You gave " + Utils.formatPlayerNameForDisplay(name1) + " " + cmd[2] + " spins.");
					} catch (NumberFormatException e) {
						return true;
					}
				} else {
					player.getPackets().sendGameMessage(Utils.formatPlayerNameForDisplay(name1) + " is either offline, or doesn't exist.");
				}
				return true;

				/*
				 * Check another players bank
				 * 
				 * Usage: ::checkbank playerName Example: ::checkbank swirl
				 */
			case "checkbank":
				name1 = "";
				for (int i = 1; i < cmd.length; i++) {
					name1 += cmd[i] + ((i == cmd.length - 1) ? "" : " ");
				}
				target = World.getPlayerByDisplayName(name1);
				if (target != null) {
					player.getPackets().sendItems(95, target.getBank().getContainerCopy());
					player.getBank().openPlayerBank(target);
				} else {
					player.getPackets().sendGameMessage(Utils.formatPlayerNameForDisplay(name1) + " is either offline, or doesn't exist.");
				}
				return true;

				/*
				 * Spawn an item
				 * 
				 * Usage: ::item itemId amount Example: ::item 995 10
				 */
			case "item":
				if (cmd.length < 2) {
					player.getPackets().sendGameMessage("Use: ::item itemId (option:amount)");
					return true;
				}
				try {
					int itemId = Integer.valueOf(cmd[1]);
					ItemDefinitions defs = ItemDefinitions.getItemDefinitions(itemId);
					if (defs.isLended()) {
						return true;
					}
					if (defs.isOverSized()) {
						player.getPackets().sendGameMessage("The item appears to be oversized.");
						return true;
					}
					name1 = defs == null ? "" : defs.getName().toLowerCase();
					player.getInventory().addItem(itemId, cmd.length >= 3 ? Integer.valueOf(cmd[2]) : 1);
					player.getPackets().sendGameMessage("You spawned <col=FF0000>" + (cmd.length >= 3 ? cmd[2] : "1") + " " + defs.getName().toLowerCase() + (cmd.length >= 3 ? "s" : "") + "</col>.");
				} catch (NumberFormatException e) {
					player.getPackets().sendGameMessage("Use: ::item itemId (optional:amount)");
				}
				return true;

				/*
				 * Search for the itemId of an item
				 * 
				 * Usage: ::getid itemName Example: ::getid dragon claws
				 */
			case "getid":
				name1 = "";
				for (int i = 1; i < cmd.length; i++) {
					name1 += cmd[i] + ((i == cmd.length - 1) ? "" : " ");
				}
				ItemSearch.searchForItem(player, name1);
				return true;

				/*
				 * Teleport to a player
				 * 
				 * Usage: ::teleto playerName Example: ::teleto swirl
				 */
			case "teleto":
				name1 = "";
				for (int i = 1; i < cmd.length; i++) {
					name1 += cmd[i] + ((i == cmd.length - 1) ? "" : " ");
				}
				target = World.getPlayerByDisplayName(name1);
				if (target != null) {
					player.setNextWorldTile(target);
				} else {
					player.getPackets().sendGameMessage(Utils.formatPlayerNameForDisplay(name1) + " is either offline, or doesn't exist.");
				}
				return true;

				/*
				 * Teleport a player to you
				 * 
				 * Usage: ::teletome playerName Example: ::teletome swirl
				 */
			case "teletome":
				name1 = "";
				for (int i = 1; i < cmd.length; i++) {
					name1 += cmd[i] + ((i == cmd.length - 1) ? "" : " ");
				}
				target = World.getPlayerByDisplayName(name1);
				if (target != null) {
					target.setNextWorldTile(player);
				} else {
					player.getPackets().sendGameMessage(Utils.formatPlayerNameForDisplay(name1) + " is either offline, or doesn't exist.");
				}
				return true;

				/*
				 * Send an update timer for the server
				 * 
				 * Usage: ::update timeInSeconds Example: ::update 60
				 */
			case "update":
				if (cmd.length < 2) {
					World.safeShutdown(false, 60);
					return true;
				} else {
					try {
						World.safeShutdown(false, Integer.valueOf(cmd[1]));
					} catch (NumberFormatException e) {
						player.getPackets().sendGameMessage("Use: ::update timeInSeconds");
					}
					return true;
				}

				/*
				 * God yourself with lots of HP and high stats
				 * 
				 * Usage: ::god Example: ::god
				 */
			case "god":
				player.setHitpoints(Short.MAX_VALUE);
				player.getEquipment().setEquipmentHpIncrease(Short.MAX_VALUE - 990);
				for (int i = 0; i < 10; i++) {
					player.getCombatDefinitions().getBonuses()[i] = 50000;
				}
				for (int i = 14; i < player.getCombatDefinitions().getBonuses().length; i++) {
					player.getCombatDefinitions().getBonuses()[i] = 50000;
				}
				return true;

				/*
				 * Give a player GFX Designer rank
				 * 
				 * Usage: ::givegfx playerName Example: ::givegfx swirl
				 */
			case "givegfx":
				name1 = "";
				for (int i = 1; i < cmd.length; i++) {
					name1 += cmd[i] + ((i == cmd.length - 1) ? "" : " ");
				}
				target = World.getPlayerByDisplayName(name1);
				if (target != null) {
					target.setGraphicDesigner(true);
					target.getPackets().sendGameMessage("You have been given graphic designer rank by " + Utils.formatPlayerNameForDisplay(player.getUsername()));
					player.getPackets().sendGameMessage("You gave " + Utils.formatPlayerNameForDisplay(name1) + " the graphic designer rank.");
				} else {
					name1 = Utils.formatPlayerNameForProtocol(name1);
					if (!SerializableFilesManager.containsPlayer(name1)) {
						player.getPackets().sendGameMessage("Account name " + Utils.formatPlayerNameForDisplay(name1) + " doesn't exist.");
						return true;
					}
					target = SerializableFilesManager.loadPlayer(name1);
					target.setUsername(name1);
					target.setGraphicDesigner(true);
					player.getPackets().sendGameMessage("You gave " + Utils.formatPlayerNameForDisplay(name1) + " the graphic designer rank.");
					SerializableFilesManager.savePlayer(target);
				}
				return true;

				/*
				 * Give a player Donator rank
				 * 
				 * Usage: ::givedonator playerName Example: ::givedonator swirl
				 */
			case "givedonator":
				name1 = "";
				for (int i = 1; i < cmd.length; i++) {
					name1 += cmd[i] + ((i == cmd.length - 1) ? "" : " ");
				}
				target = World.getPlayerByDisplayName(name1);
				if (target != null) {
					target.setDonator(true);
					target.getPackets().sendGameMessage("You have been given donator rank by " + Utils.formatPlayerNameForDisplay(player.getUsername()));
					player.getPackets().sendGameMessage("You gave " + Utils.formatPlayerNameForDisplay(name1) + " the donator rank.");
				} else {
					name1 = Utils.formatPlayerNameForProtocol(name1);
					if (!SerializableFilesManager.containsPlayer(name1)) {
						player.getPackets().sendGameMessage("Account name " + Utils.formatPlayerNameForDisplay(name1) + " doesn't exist.");
						return true;
					}
					target = SerializableFilesManager.loadPlayer(name1);
					target.setUsername(name1);
					target.setDonator(true);
					player.getPackets().sendGameMessage("You gave " + Utils.formatPlayerNameForDisplay(name1) + " the donator rank.");
					SerializableFilesManager.savePlayer(target);
				}
				return true;

				/*
				 * Give a player Extreme Donator rank
				 * 
				 * Usage: ::giveexdonator playerName Example: ::giveexdonator
				 * swirl
				 */
			case "giveexdonator":
				name1 = "";
				for (int i = 1; i < cmd.length; i++) {
					name1 += cmd[i] + ((i == cmd.length - 1) ? "" : " ");
				}
				target = World.getPlayerByDisplayName(name1);
				if (target != null) {
					target.setExtremeDonator(true);
					target.getPackets().sendGameMessage("You have been given extreme donator rank by " + Utils.formatPlayerNameForDisplay(player.getUsername()));
					player.getPackets().sendGameMessage("You gave " + Utils.formatPlayerNameForDisplay(name1) + " the extreme donator rank.");
				} else {
					name1 = Utils.formatPlayerNameForProtocol(name1);
					if (!SerializableFilesManager.containsPlayer(name1)) {
						player.getPackets().sendGameMessage("Account name " + Utils.formatPlayerNameForDisplay(name1) + " doesn't exist.");
						return true;
					}
					target = SerializableFilesManager.loadPlayer(name1);
					target.setUsername(name1);
					target.setExtremeDonator(true);
					player.getPackets().sendGameMessage("You gave " + Utils.formatPlayerNameForDisplay(name1) + " the extreme donator rank.");
					SerializableFilesManager.savePlayer(target);
				}
				return true;

				/*
				 * Give a player Developer rank
				 * 
				 * Usage: ::givedev playerName Example: ::givedev swirl
				 */
			case "givedev":
				name1 = "";
				for (int i = 1; i < cmd.length; i++) {
					name1 += cmd[i] + ((i == cmd.length - 1) ? "" : " ");
				}
				target = World.getPlayerByDisplayName(name1);
				if (target != null) {
					target.setDeveloper(true);
					target.getPackets().sendGameMessage("You have been given developer rank by " + Utils.formatPlayerNameForDisplay(player.getUsername()));
					player.getPackets().sendGameMessage("You gave " + Utils.formatPlayerNameForDisplay(name1) + " the developer rank.");
				} else {
					name1 = Utils.formatPlayerNameForProtocol(name1);
					if (!SerializableFilesManager.containsPlayer(name1)) {
						player.getPackets().sendGameMessage("Account name " + Utils.formatPlayerNameForDisplay(name1) + " doesn't exist.");
						return true;
					}
					target = SerializableFilesManager.loadPlayer(name1);
					target.setUsername(name1);
					target.setDeveloper(true);
					player.getPackets().sendGameMessage("You gave " + Utils.formatPlayerNameForDisplay(name1) + " the developer rank.");
					SerializableFilesManager.savePlayer(target);
				}
				return true;

				/*
				 * Take a players GFX Designer rank
				 * 
				 * Usage: ::takegfx playerName Example: ::takegfx swirl
				 */
			case "takegfx":
				name1 = "";
				for (int i = 1; i < cmd.length; i++) {
					name1 += cmd[i] + ((i == cmd.length - 1) ? "" : " ");
				}
				target = World.getPlayerByDisplayName(name1);
				if (target != null) {
					target.setGraphicDesigner(false);
					target.getPackets().sendGameMessage("Your graphic designer rank was taken by " + Utils.formatPlayerNameForDisplay(player.getUsername()));
					player.getPackets().sendGameMessage("You took " + Utils.formatPlayerNameForDisplay(name1) + "'s graphic designer rank.");
				} else {
					name1 = Utils.formatPlayerNameForProtocol(name1);
					if (!SerializableFilesManager.containsPlayer(name1)) {
						player.getPackets().sendGameMessage("Account name " + Utils.formatPlayerNameForDisplay(name1) + " doesn't exist.");
						return true;
					}
					target = SerializableFilesManager.loadPlayer(name1);
					target.setUsername(name1);
					target.setGraphicDesigner(false);
					player.getPackets().sendGameMessage("You took " + Utils.formatPlayerNameForDisplay(name1) + "'s graphic designer rank.");
					SerializableFilesManager.savePlayer(target);
				}
				return true;

				/*
				 * Take a players Donator rank
				 * 
				 * Usage: ::takedonator playerName Example: ::takedonator swirl
				 */
			case "takedonator":
				name1 = "";
				for (int i = 1; i < cmd.length; i++) {
					name1 += cmd[i] + ((i == cmd.length - 1) ? "" : " ");
				}
				target = World.getPlayerByDisplayName(name1);
				if (target != null) {
					target.setDonator(false);
					target.getPackets().sendGameMessage("Your donator rank was taken by " + Utils.formatPlayerNameForDisplay(player.getUsername()));
					player.getPackets().sendGameMessage("You took " + Utils.formatPlayerNameForDisplay(name1) + "'s donator rank.");
				} else {
					name1 = Utils.formatPlayerNameForProtocol(name1);
					if (!SerializableFilesManager.containsPlayer(name1)) {
						player.getPackets().sendGameMessage("Account name " + Utils.formatPlayerNameForDisplay(name1) + " doesn't exist.");
						return true;
					}
					target = SerializableFilesManager.loadPlayer(name1);
					target.setUsername(name1);
					target.setDonator(false);
					player.getPackets().sendGameMessage("You took " + Utils.formatPlayerNameForDisplay(name1) + "'s donator rank.");
					SerializableFilesManager.savePlayer(target);
				}
				return true;

				/*
				 * Take a players Extreme Donator rank
				 * 
				 * Usage: ::takeexdonator playerName Example: ::takeexdonator
				 * swirl
				 */
			case "takeexdonator":
				name1 = "";
				for (int i = 1; i < cmd.length; i++) {
					name1 += cmd[i] + ((i == cmd.length - 1) ? "" : " ");
				}
				target = World.getPlayerByDisplayName(name1);
				if (target != null) {
					target.setExtremeDonator(false);
					target.getPackets().sendGameMessage("Your extreme donator rank was taken by " + Utils.formatPlayerNameForDisplay(player.getUsername()));
					player.getPackets().sendGameMessage("You took " + Utils.formatPlayerNameForDisplay(name1) + "'s extreme donator rank.");
				} else {
					name1 = Utils.formatPlayerNameForProtocol(name1);
					if (!SerializableFilesManager.containsPlayer(name1)) {
						player.getPackets().sendGameMessage("Account name " + Utils.formatPlayerNameForDisplay(name1) + " doesn't exist.");
						return true;
					}
					target = SerializableFilesManager.loadPlayer(name1);
					target.setUsername(name1);
					target.setExtremeDonator(false);
					player.getPackets().sendGameMessage("You took " + Utils.formatPlayerNameForDisplay(name1) + "'s extreme donator rank.");
					SerializableFilesManager.savePlayer(target);
				}
				return true;

				/*
				 * Take a players Developer rank
				 * 
				 * Usage: ::takedev playerName Example: ::takedev swirl
				 */
			case "takedev":
				name1 = "";
				for (int i = 1; i < cmd.length; i++) {
					name1 += cmd[i] + ((i == cmd.length - 1) ? "" : " ");
				}
				target = World.getPlayerByDisplayName(name1);
				if (target != null) {
					target.setDeveloper(false);
					target.getPackets().sendGameMessage("Your developer rank was taken by " + Utils.formatPlayerNameForDisplay(player.getUsername()));
					player.getPackets().sendGameMessage("You took " + Utils.formatPlayerNameForDisplay(name1) + "'s developer rank.");
				} else {
					name1 = Utils.formatPlayerNameForProtocol(name1);
					if (!SerializableFilesManager.containsPlayer(name1)) {
						player.getPackets().sendGameMessage("Account name " + Utils.formatPlayerNameForDisplay(name1) + " doesn't exist.");
						return true;
					}
					target = SerializableFilesManager.loadPlayer(name1);
					target.setUsername(name1);
					target.setDeveloper(false);
					player.getPackets().sendGameMessage("You took " + Utils.formatPlayerNameForDisplay(name1) + "'s developer rank.");
					SerializableFilesManager.savePlayer(target);
				}
				return true;

				/*
				 * Show your position in the world
				 * 
				 * Usage: ::mypos Example: ::mypos
				 */
			case "mypos":
				player.getPackets().sendGameMessage("X: " + player.getX() + " Y: " + player.getY() + " Plane: " + player.getPlane());
				player.getPackets().sendGameMessage("Region ID: " + player.getRegionId() + " Region X: " + player.getChunkX() + " Region Y: " + player.getChunkY());
				return true;

				/*
				 * Heals you instantly
				 * 
				 * Usage: ::heal Example: ::heal
				 */
			case "heal":
				for (Player players : World.getPlayers()) {
					if (players == null)
						continue;
				players.setNextGraphics(new Graphics(92));
				players.heal(1000);
				players.getPackets().sendGameMessage("Your LP has been restored!");
				return true;
				}
				/*
				 * Instantly restore your special bar
				 * 
				 * Usage: ::spec Example: ::spec
				 */
			case "spec":
				for (Player players : World.getPlayers()) {
					if (players == null)
						continue;
				players.setNextGraphics(new Graphics(2128));
				players.getCombatDefinitions().restoreSpecialAttack(100);
				players.getPackets().sendGameMessage("Your Special Attack has been restored!");
				return true;
				}

				/*
				 * Instantly restore all your prayer
				 * 
				 * Usage: ::prayer Example: ::prayer
				 */
			case "prayer":
				for (Player players : World.getPlayers()) {
					if (players == null)
						continue;
				players.setNextGraphics(new Graphics(2211));
				players.getPrayer().setPrayerpoints((int) ((int) (player.getSkills().getLevelForXp(Skills.PRAYER) * 10)));
				players.getPackets().sendGameMessage("Your Prayer has been restored!");
				return true;
				}
				/*
				 * Makes you immune to dragonfire
				 * 
				 * Usage: ::dfire Example: ::dfire
				 */
			case "dfire":
				for (Player players : World.getPlayers()) {
					if (players == null)
						continue;
				players.setNextGraphics(new Graphics(2455));
				players.addFireImmune(6000);
				players.getPackets().sendGameMessage("You are now immune to dragonfire!");
				return true;
				}

				/*
				 * Spams yell for an important message
				 * 
				 * Usage: ::spamyell Example: ::spamyell message
				 */
			case "spamyell":
				message = "";
				for (int i = 1; i < cmd.length; i++) {
					message += cmd[i] + ((i == cmd.length - 1) ? "" : " ");
				}
				Commands.sendYell(player, Utils.fixChatMessage(message), false);
				Commands.sendYell(player, Utils.fixChatMessage(message), false);
				Commands.sendYell(player, Utils.fixChatMessage(message), false);
				Commands.sendYell(player, Utils.fixChatMessage(message), false);
				Commands.sendYell(player, Utils.fixChatMessage(message), false);
				Commands.sendYell(player, Utils.fixChatMessage(message), false);
				return true;

				/*
				 * Opens your bank anywhere
				 * 
				 * Usage: ::bank Example: ::bank
				 */
			case "bank":
				player.getBank().openBank();
				return true;
				
			
				/*
				 * Hides you
				 * 
				 * Usage: ::hide Example: hide
				 */
			case "hide":
				player.getAppearence().switchHidden();
				player.getPackets().sendGameMessage("Am I hidden? " + player.getAppearence().isHidden());
				return true;

				/*
				 * Spawns the 7 pengs
				 * 
				 * Usage: ::spawnpenguins Example: spawnpenguins
				 */
			case "spawnpenguins":
				World.spawnNPC(8110, player, -1, true, true);
				World.spawnNPC(8109, player, -1, true, true);
				World.spawnNPC(8108, player, -1, true, true);
				World.spawnNPC(8107, player, -1, true, true);
				World.spawnNPC(8106, player, -1, true, true);
				World.spawnNPC(8105, player, -1, true, true);
				World.spawnNPC(8104, player, -1, true, true);
				return true;

			case "star":
				player.recievedGift = false;
				player.starSprite = true;
				World.spawnStar();
				ShootingStar.spawnRandomStar();
				return true;

				/*
				 * Disables the Yell for all players online
				 * 
				 * Usage: ::toggleyell Example: ::toggleyell
				 */
			case "toggleyell":
				if (!CanYell) {
					CanYell = true;
					player.getPackets().sendGameMessage("<col=05f4d0>The Yell has been disabled by an administrator!");
				} else {
					CanYell = false;
					player.getPackets().sendGameMessage("<col=05f4d0>The Yell has been enabled by an administrator!");
				}
				return true;

			case "vulnerable":
				player.setInvulnerable(false);
				player.getPackets().sendGameMessage("<col=05f4d0>You are vulnerable again!", false);
				return true;

			case "invulnerable":
				player.setInvulnerable(true);
				player.getPackets().sendGameMessage("<col=05f4d0>You are invulnerable!", false);
				player.setNextGraphics(new Graphics(2319));
				player.setNextGraphics(new Graphics(2321));
				return true;
				
			case "getrender":
				player.getPackets().sendGameMessage("Testing renders");
				for (int i = 0; i < 3000; i++) {
					try {
						player.getAppearence().setRenderEmote(i);
						player.getPackets().sendGameMessage("Testing " + i);
						Thread.sleep(600);
					} catch (InterruptedException e) {
						e.printStackTrace();
					}
				}
				return true;
				
			case "takeshield":
				name1 = "";
				for (int i = 1; i < cmd.length; i++) {
					name1 += cmd[i] + ((i == cmd.length - 1) ? "" : " ");
				}
				target = World.getPlayerByDisplayName(name1);
				if (target != null) {
					target.setInvulnerable(false);
					target.getPackets().sendGameMessage("<col=05f4d0>You are vulnerable!", false);			
				} else {
					player.getPackets().sendGameMessage(Utils.formatPlayerNameForDisplay(name1) + " is either offline, or doesn't exist.");
					return true;
				}
				return true;
				
			case "giveshield":
				name1 = "";
				for (int i = 1; i < cmd.length; i++) {
					name1 += cmd[i] + ((i == cmd.length - 1) ? "" : " ");
				}
				target = World.getPlayerByDisplayName(name1);
				if (target != null) {
					target.setInvulnerable(true);
					target.getPackets().sendGameMessage("<col=05f4d0>You are invulnerable!", false);
					target.setNextGraphics(new Graphics(2319));
					target.setNextGraphics(new Graphics(2321));				
				} else {
					player.getPackets().sendGameMessage(Utils.formatPlayerNameForDisplay(name1) + " is either offline, or doesn't exist.");
					return true;
				}
				return true;
				/*
				 * Give yourself or a player completionist cape
				 * 
				 * Usage: ::comp playerName Example: ::comp swirl
				 */
			case "comp":
				if (cmd.length >= 2) {
					name1 = "";
					for (int i = 1; i < cmd.length; i++) {
						name1 += cmd[i] + ((i == cmd.length - 1) ? "" : " ");
					}
					target = World.getPlayerByDisplayName(name1);
					if (target != null) {
						target.getSkills().setXp(Skills.ATTACK, 13034431);
						target.getSkills().setXp(Skills.STRENGTH, 13034431);
						target.getSkills().setXp(Skills.DEFENCE, 13034431);
						target.getSkills().setXp(Skills.RANGE, 13034431);
						target.getSkills().setXp(Skills.PRAYER, 13034431);
						target.getSkills().setXp(Skills.MAGIC, 13034431);
						target.getSkills().setXp(Skills.RUNECRAFTING, 13034431);
						target.getSkills().setXp(Skills.CONSTRUCTION, 13034431);
						target.getSkills().setXp(Skills.HITPOINTS, 13034431);
						target.getSkills().setXp(Skills.AGILITY, 13034431);
						target.getSkills().setXp(Skills.HERBLORE, 13034431);
						target.getSkills().setXp(Skills.THIEVING, 13034431);
						target.getSkills().setXp(Skills.FLETCHING, 13034431);
						target.getSkills().setXp(Skills.CRAFTING, 13034431);
						target.getSkills().setXp(Skills.HUNTER, 13034431);
						target.getSkills().setXp(Skills.SLAYER, 13034431);
						target.getSkills().setXp(Skills.MINING, 13034431);
						target.getSkills().setXp(Skills.SMITHING, 13034431);
						target.getSkills().setXp(Skills.FISHING, 13034431);
						target.getSkills().setXp(Skills.COOKING, 13034431);
						target.getSkills().setXp(Skills.FIREMAKING, 13034431);
						target.getSkills().setXp(Skills.WOODCUTTING, 13034431);
						target.getSkills().setXp(Skills.FARMING, 13034431);
						target.getSkills().setXp(Skills.SUMMONING, 13034431);
						target.getSkills().setXp(Skills.DUNGEONEERING, 104273167);
						target.shrimp = 100;
						target.lobsters = 250;
						target.swordfish = 577;
						target.cooked = 1000;
						target.normalLogs = 50;
						target.oakLogs = 100;
						target.mapleLogs = 500;
						target.logsBurnt = 1000;
						target.advancedBarbCourse = 100;
						target.advancedGnomeCourse = 100;
						target.barbCourse = 50;
						target.gnomeCourse = 50;
						target.setKilledQueenBlackDragon(true);
						target.setCompletedFightCaves();
						target.setCompletedFightKiln();
						target.taskCount = 50;
						target.barrowsCount = 50;
						target.crystalChests = 50;
						target.getQuestManager().completeQuest(Quests.NOMADS_REQUIEM);
						target.getQuestManager().completeQuest(Quests.PERIL_OF_ICE_MONTAINS);
					} else {
						player.getPackets().sendGameMessage(Utils.formatPlayerNameForDisplay(name1) + " is either offline, or doesn't exist.");
						return true;
					}
					return true;
				} else {
					player.getSkills().set(Skills.ATTACK, 99);
					player.getSkills().set(Skills.STRENGTH, 99);
					player.getSkills().set(Skills.DEFENCE, 99);
					player.getSkills().set(Skills.RANGE, 99);
					player.getSkills().set(Skills.PRAYER, 99);
					player.getSkills().set(Skills.MAGIC, 99);
					player.getSkills().set(Skills.RUNECRAFTING, 99);
					player.getSkills().set(Skills.CONSTRUCTION, 99);
					player.getSkills().set(Skills.HITPOINTS, 99);
					player.getSkills().set(Skills.AGILITY, 99);
					player.getSkills().set(Skills.HERBLORE, 99);
					player.getSkills().set(Skills.THIEVING, 99);
					player.getSkills().set(Skills.FLETCHING, 99);
					player.getSkills().set(Skills.CRAFTING, 99);
					player.getSkills().set(Skills.HUNTER, 99);
					player.getSkills().set(Skills.SLAYER, 99);
					player.getSkills().set(Skills.MINING, 99);
					player.getSkills().set(Skills.SMITHING, 99);
					player.getSkills().set(Skills.FISHING, 99);
					player.getSkills().set(Skills.COOKING, 99);
					player.getSkills().set(Skills.FIREMAKING, 99);
					player.getSkills().set(Skills.WOODCUTTING, 99);
					player.getSkills().set(Skills.FARMING, 99);
					player.getSkills().set(Skills.SUMMONING, 99);
					player.getSkills().set(Skills.DUNGEONEERING, 120);
					player.shrimp = 100;
					player.lobsters = 250;
					player.swordfish = 577;
					player.cooked = 1000;
					player.normalLogs = 50;
					player.oakLogs = 100;
					player.mapleLogs = 500;
					player.logsBurnt = 1000;
					player.advancedBarbCourse = 100;
					player.advancedGnomeCourse = 100;
					player.barbCourse = 50;
					player.gnomeCourse = 50;
					player.setKilledQueenBlackDragon(true);
					player.setCompletedFightCaves();
					player.setCompletedFightKiln();
					player.taskCount = 50;
					player.barrowsCount = 50;
					player.crystalChests = 50;
					player.getQuestManager().completedQuest(Quests.NOMADS_REQUIEM);
					player.getQuestManager().completedQuest(Quests.PERIL_OF_ICE_MONTAINS);
					return true;
				}
			}
		}
		return false;
	}
}
